import request from '@/utils/request';

export function login(username, password) {
  // 模拟登录逻辑
  return request({
    url: '/login',
    method: 'post',
    data: {
      username,
      password
    }
  })
}

export function logout() {
  return request({
    url: '/logout',
    method: 'post'
  })
}

export function isAuthenticated() {
  return localStorage.getItem('access-token') ? true : false;
}
